import 'dart:convert';
/// directiveId : "2f3610a7-fdcb-4f3f-ab65-75e3f68265ee"
/// projectId : "c26892b6-9a70-487b-b786-515573e0960e"
/// projectName : "郑州合茂融源置业有限公司北大国际创业孵化中心项目"
/// projectAlias : "合茂置业北大国际孵化中心"
/// projectSpecialUserId : "6d1b3f92-3baf-494b-b9f6-01a4f05d6e53"
/// directiveTime : "2022-09-14 14:00"
/// tagDate : "2022-09-14"
/// tagTime : "14:00"
/// directiveContent : " <code contenteditable=\"false\" class=\"at_text\" data-id=\"b8d432a7-fb35-4dde-984f-e9900d152819\">@王亚东</code>关于对企服务政策，帮助刘福丽进行梳理一下"
/// directiveUserId : "873ea436-1fa6-4a1d-bc29-352fe75d9ea7"
/// directiveUserName : "测试账号"
/// targetUserIds : ["b8d432a7-fb35-4dde-984f-e9900d152819"]
/// backNums : "0"
/// newBackTime : "2022-09-14 14:00:57.724000"
/// isReadPs : "0"
/// isReadPsBack : "0"
/// isRead : "0"
/// targetUserNums : "1"
/// backUserNames : ["王亚东"]
/// notBackUserNames : ["王亚东"]
/// backInfos : []

ProInstruction proInstructionFromJson(String str) => ProInstruction.fromJson(json.decode(str));
String proInstructionToJson(ProInstruction data) => json.encode(data.toJson());
class ProInstruction {
  ProInstruction({
      this.directiveId, 
      this.projectId, 
      this.projectName, 
      this.projectAlias, 
      this.projectSpecialUserId, 
      this.directiveTime, 
      this.tagDate, 
      this.tagTime, 
      this.directiveContent, 
      this.directiveUserId, 
      this.directiveUserName, 
      this.targetUserIds, 
      this.backNums, 
      this.newBackTime, 
      this.isReadPs, 
      this.isReadPsBack, 
      this.isRead, 
      this.targetUserNums, 
      this.backUserNames, 
      this.notBackUserNames, 
      this.backInfos,});

  ProInstruction.fromJson(dynamic json) {
    directiveId = json['directiveId'];
    projectId = json['projectId'];
    projectName = json['projectName'];
    projectAlias = json['projectAlias'];
    projectSpecialUserId = json['projectSpecialUserId'];
    directiveTime = json['directiveTime'];
    tagDate = json['tagDate'];
    tagTime = json['tagTime'];
    directiveContent = json['directiveContent'];
    directiveUserId = json['directiveUserId'];
    directiveUserName = json['directiveUserName'];
    targetUserIds = json['targetUserIds'] != null ? json['targetUserIds'].cast<String>() : [];
    backNums = json['backNums'];
    newBackTime = json['newBackTime'];
    isReadPs = json['isReadPs'];
    isReadPsBack = json['isReadPsBack'];
    isRead = json['isRead'];
    targetUserNums = json['targetUserNums'];
    backUserNames = json['backUserNames'] != null ? json['backUserNames'].cast<String>() : [];
    notBackUserNames = json['notBackUserNames'] != null ? json['notBackUserNames'].cast<String>() : [];
    // if (json['backInfos'] != null) {
    //   backInfos = [];
    //   json['backInfos'].forEach((v) {
    //     backInfos?.add(Dynamic.fromJson(v));
    //   });
    // }
  }
  String? directiveId;
  String? projectId;
  String? projectName;
  String? projectAlias;
  String? projectSpecialUserId;
  String? directiveTime;
  String? tagDate;
  String? tagTime;
  String? directiveContent;
  String? directiveUserId;
  String? directiveUserName;
  List<String>? targetUserIds;
  String? backNums;
  String? newBackTime;
  String? isReadPs;
  String? isReadPsBack;
  String? isRead;
  String? targetUserNums;
  List<String>? backUserNames;
  List<String>? notBackUserNames;
  List<dynamic>? backInfos;
ProInstruction copyWith({  String? directiveId,
  String? projectId,
  String? projectName,
  String? projectAlias,
  String? projectSpecialUserId,
  String? directiveTime,
  String? tagDate,
  String? tagTime,
  String? directiveContent,
  String? directiveUserId,
  String? directiveUserName,
  List<String>? targetUserIds,
  String? backNums,
  String? newBackTime,
  String? isReadPs,
  String? isReadPsBack,
  String? isRead,
  String? targetUserNums,
  List<String>? backUserNames,
  List<String>? notBackUserNames,
  List<dynamic>? backInfos,
}) => ProInstruction(  directiveId: directiveId ?? this.directiveId,
  projectId: projectId ?? this.projectId,
  projectName: projectName ?? this.projectName,
  projectAlias: projectAlias ?? this.projectAlias,
  projectSpecialUserId: projectSpecialUserId ?? this.projectSpecialUserId,
  directiveTime: directiveTime ?? this.directiveTime,
  tagDate: tagDate ?? this.tagDate,
  tagTime: tagTime ?? this.tagTime,
  directiveContent: directiveContent ?? this.directiveContent,
  directiveUserId: directiveUserId ?? this.directiveUserId,
  directiveUserName: directiveUserName ?? this.directiveUserName,
  targetUserIds: targetUserIds ?? this.targetUserIds,
  backNums: backNums ?? this.backNums,
  newBackTime: newBackTime ?? this.newBackTime,
  isReadPs: isReadPs ?? this.isReadPs,
  isReadPsBack: isReadPsBack ?? this.isReadPsBack,
  isRead: isRead ?? this.isRead,
  targetUserNums: targetUserNums ?? this.targetUserNums,
  backUserNames: backUserNames ?? this.backUserNames,
  notBackUserNames: notBackUserNames ?? this.notBackUserNames,
  backInfos: backInfos ?? this.backInfos,
);
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['directiveId'] = directiveId;
    map['projectId'] = projectId;
    map['projectName'] = projectName;
    map['projectAlias'] = projectAlias;
    map['projectSpecialUserId'] = projectSpecialUserId;
    map['directiveTime'] = directiveTime;
    map['tagDate'] = tagDate;
    map['tagTime'] = tagTime;
    map['directiveContent'] = directiveContent;
    map['directiveUserId'] = directiveUserId;
    map['directiveUserName'] = directiveUserName;
    map['targetUserIds'] = targetUserIds;
    map['backNums'] = backNums;
    map['newBackTime'] = newBackTime;
    map['isReadPs'] = isReadPs;
    map['isReadPsBack'] = isReadPsBack;
    map['isRead'] = isRead;
    map['targetUserNums'] = targetUserNums;
    map['backUserNames'] = backUserNames;
    map['notBackUserNames'] = notBackUserNames;
    if (backInfos != null) {
      map['backInfos'] = backInfos?.map((v) => v.toJson()).toList();
    }
    return map;
  }

}